package cn.maxhou.sl2.test;

import cn.maxhou.sl1.entity.Pet;
import cn.maxhou.sl1.service.PetService;
import cn.maxhou.sl2.factory.PetDaoFactpry;
import cn.maxhou.sl2.service.impl.PetServiceImpl;

public class Main {
    public static void main(String[] args) {
        //领导要修改成oracle实现，只需修改一个变量即可切换
        PetDaoFactpry.defaultBeanName="PetDaoOracleImpl";
        //创建PetService
        PetService petService = new PetServiceImpl();
        Pet pet = new Pet();
        pet.setName("小马喽");
        petService.save(pet);
    }
}
